package game;

import java.awt.Color;

public abstract class AbstractSprite implements Sprite {

	protected int x;

	protected int y;

	protected int x1;

	protected int y1;

	protected int width;

	protected int height;

	protected Color color = null;
	
	public AbstractSprite(int x, int y, int width, int height, Color color) {
		this.x = x;
		this.y = y;
		this.width = width; 
		this.height = height;
		this.x1 = x + width;
		this.y1 = y + height;
		this.color = color;
	}
	
	@Override
	public void setCoordinates(int x, int y) {
		this.x = x;
		this.y = y;
		this.x1 = x + width;
		this.y1 = y + height;
	}
	
	@Override
	public void setDimentions(int width, int height) {
		this.width = width; 
		this.height = height;
		this.x1 = x + width;
		this.y1 = y + height;
	}

	@Override
	public int getX() {
		return x;
	}

	@Override
	public int getY() {
		return y;
	}

	@Override
	public int getX1() {
		return x1;
	}

	@Override
	public int getY1() {
		return y1;
	}

	@Override
	public int getHeight() {
		return height;
	}

	@Override
	public int getWidth() {
		return width;
	}

	@Override
	public Color getColor() {
		return color;
	}

}
